/* CD Carousel Door */ ;/* v2.02 */ ;/* by Bill Esposito */;/* The Cereal Port BBS */;/* 1:132/152 */;/* (603)899-3335 */;/* */;/* Magic name 'CDCAR' */;/* for latest version */;/* */;/* *********************************************************************** */;/* DISCLAIMER: This software is provided "AS IS" without any warranty of */;/* any kind, either expressed or implied. USE IT AT YOUR OWN RISK. */;/* */;/* Copyright 1993 by Bill Esposito. This program is SHAREWARE. Please */;/* read the file SHAREWRE.TXT included in this archive. */;/* *********************************************************************** */;/* ***** CDCAR.CMD ***** */;/* The CD Carousel Door program. */;/***************************************************************************/
signal on HALT NAME menu;Arg configdir ansi me user;ver='v2.02';if key = '' then key = '%';'@echo off';config=configdir''cdcar.cfg;f=1;do until lines(config)=0; param.f=linein(config); f=f+1;end;ok=stream(config,c,'close');parse var param.1 disk junk;parse var param.2 menutype junk;parse var param.3 homedir junk;parse var param.4 maxdir junk;parse var param.5 download junk;parse var param.6 fnum junk;parse var param.7 type junk;parse var param.8 marea junk
parse var param.9 tnode junk;parse var param.10 fnode junk;parse var param.11 sysopfirst sysoplast junk;parse var param.12 stype junk;parse var param.13 smarea junk;parse var param.15 pl junk;parse var param.17 standalone junk;/* parse var param.18 defaultcd junk */;configcd=configdir''cdcar.cfg;f=1;do until lines(configcd)=0; if f > 17 then default.f=linein(configcd); else scrap=linein(configcd); f=f+1;end;cdes=f-17;if cdes=1 then cdes=2;ok=stream(config,c,'close');sys=configdir''cdcar.sys;f=1
do until lines(sys)=0; sysparam.f=linein(sys); f=f+1;end;ok=stream(sys,c,'close');parse var sysparam.1 priv;parse var sysparam.2 key1;parse var sysparam.3 key2;parse var sysparam.4 key3;parse var sysparam.5 key4;parse var sysparam.6 key5;parse var sysparam.7 key6;parse var sysparam.8 key7;parse var sysparam.9 key8;if key='' then key='%';reqflag='0';if ansi=2 then ansi = 0;parse var user first2 mid2 last2;nmi='NO';alias='NO'
if last2='' then do; nmi='YES'; first=first2; last=mid2; mid='';end;if mid2='' then do; alias='YES'; first=first2; last=''; mid='';end;if nmi='NO' then do; first=first2; mid=mid2; last=last2;end ;grn='';yel='';red=''
do until lines(file)=0;parse upper value linein(file) with level loc disks diskdesc ;parse upper var disk disku ;if disks=disku then signal done;end;done:;menu:;signal on HALT NAME menu; if ansi=1 then if menutype=0 then do;say'HOS/2OS/2OS/2OS/2OS/2';say'1HOS/2OS/2OS/2OS/2OS/2OS/2OS';say'7H/2OS/2OS/2OS/2OS/2OS/2OS/2OS';say'5H/2OS/2HS 0HOH/H' ;say'0HCD Carousel Door0HSH25H'ver'0H/';say'HO0HBy Bill Esposito0H2HS0HOH/1H';say'1H 4H 9H 0HSH2';say'1HThe Selected CD is: 'disk' 0H/HO';say'9H 0H21HS3H' ;say'11HChange CD40H 80HO'
say'1H/80HS1H228H File Area Selec';say'45Ht 80H/1HO80H21HS';say'28H Search by Filename/Text80HO1H/80HS';say'1H228H Bulletins 65H ';say'80H/1HO80H21HS26H' ;say'27H ?Help 63H 80HO';say'1H/80HS1H230HQuit back to BBS';say'80H/1HO31H 80H21HS';say'28H 80HO1H/2OS/2O';say'8HS/2OS/2OS/2OS/2OS/2OS/2OS/2';say'35HOS/2OS/2OS/2OS/2OS/2OS/2';say'59HOS/2OS/2OS/2OS/2OS/2OS';say'1H';; end; ; if ansi='0' then if menutype=0 then do; '@cls'; say 'OS/2OS/2OS/2OS/2OS/2OS/2OS/2OS/2OS/2OS/2OS/2OS/2OS/2OS/2OS/2OS/2OS/2OS/2OS/2'; say
say ' CD Carousel Door '; say ' 'ver ; say ' By Bill Esposito'; say ' * UnRegistered *'; say ; say ' The Currently Selected CD is: 'disk; say ; say ' C)hange Disk'; say ; say ' F)ile Area ' ; say ; say ' S)earch by Filename/Text'; say ; say ' B)ulletins '; say; say ' ?)Help' ; say ; say ' Q)uit Back to BBS'; say ; say 'OS/2OS/2OS/2OS/2OS/2OS/2OS/2OS/2OS/2OS/2OS/2OS/2OS/2OS/2OS/2OS/2OS/2OS/2OS/2'
end ;;if menutype=1 then do; say; say brt||yel' CD Carousel Door: 'red||disk; say; say brt||yel||'C'gry'hange disk 'brt||yel'F'gry'ile area Select 'brt||yel'S'gry'earch by Filename/Text' ; say brt||yel'B'gry'ulletins 'brt||yel'Q'gry'uit to main 'brt||yel'?'gry'Help' ;end;pull sel;if sel = 'B' then call bull;if sel = '?' then call help;if sel='C' then call change_disk;if sel='C' then call menu;if sel ='F' then call filearealst;if reqflag=1 then do; if sel = 'Q' then call quit;end; if def=1 then if sel = 'Q' then call quit; if sel = 'Q' then call quit1
if sel ='S' then call find;signal menu;;/* file area list */;filearealst:;close=stream(file,c,'close');more = 1;file=homedir''disk'\names.lst';'@cls';;/* Read */;read: ;x=1;y='1';open=stream(file,c,'open');;linein(file,1,0) ;;loop2:;if more <> 3 then '@cls'
name.=0 ;do i=1 to 20; xx=right(x,2); if sel='F' then do; parse value linein(file) with name5 fuldir dirdesc; dirdesc=strip(dirdesc); name.i=xx'. 'left(name5,10) dirdesc; fulldir.i=fuldir; end ; if sel<>'F' then if sel <>'B' then if sel <>'?' then if sel <> 'C' then do; parse value linein(file) with disks diskdesc; name.i= xx'. 'disks' 'strip(diskdesc); end ; else if sel<>'F' then if sel <>'B' then if sel <>'?' then do; parse value linein(file) with level loc disks diskdesc ; if me=1 then key = '%'; if me=1 then loc = '%'; if me=1 then priv = 10; if pl=1 then key = '%'; if pl=1 then loc = '%'
if pl=1 then priv = 10; if priv < level then name.i= level loc xx'. CDROM Not Available at your access level.'; if loc <> key1 then name.i= level loc xx'. CDROM Not Available at your access level.'; if loc <> key2 then name.i= level loc xx'. CDROM Not Available at your access level.'; if loc <> key3 then name.i= level loc xx'. CDROM Not Available at your access level.'; if loc <> key4 then name.i= level loc xx'. CDROM Not Available at your access level.'; if loc <> key5 then name.i= level loc xx'. CDROM Not Available at your access level.'; if loc <> key6 then name.i= level loc xx'. CDROM Not Available at your access level.'; if loc <> key7 then name.i= level loc xx'. CDROM Not Available at your access level.'; if loc <> key8 then name.i= level loc xx'. CDROM Not Available at your access level.'; if priv >= level then if loc = key1 then name.i= level loc xx'. 'disks' 'strip(diskdesc); if priv >= level then if loc = key2 then name.i= level loc xx'. 'disks' 'strip(diskdesc); if priv >= level then if loc = key3 then name.i= level loc xx'. 'disks' 'strip(diskdesc); if priv >= level then if loc = key4 then name.i= level loc xx'. 'disks' 'strip(diskdesc); if priv >= level then if loc = key5 then name.i= level loc xx'. 'disks' 'strip(diskdesc); if priv >= level then if loc = key6 then name.i= level loc xx'. 'disks' 'strip(diskdesc); if priv >= level then if loc = key7 then name.i= level loc xx'. 'disks' 'strip(diskdesc); if priv >= level then if loc = key8 then name.i= level loc xx'. 'disks' 'strip(diskdesc); if priv >= level then if loc = '%' then name.i= level loc xx'. 'disks' 'strip(diskdesc); end
if sel = 'B' then name.i = linein(file); se=0; if more=3 then do; parse var name.i level loc number nam diskdesc; name.i = level loc right(number,3) nam diskdesc;end ; if sel='F' then do; parse var name.i num name5 dirdesc; dirdesc=strip(dirdesc); say brt||yel||right(num,3)||grn||left(name5,10) cyan||dirdesc; end; if sel <>'F' then if sel <> 'B' then if sel <> '?' then if sel <> 'C' then do; name.i=left(name.i,79); parse var name.i num fn sz dt dc; say brt||red||right(num,3)||yel||left(fn,13)||red||right(sz,8)||grn||right(dt,9)' 'cyan||left(dc,44); end; if sel = 'C' then do; ast=' '; name.i=left(name.i,79); parse var name.i level loc num disk6 diskdesc
u=1; paramno=17; do until u = cdes; paramno=paramno+1; parse upper var default.paramno dcd3 junk; parse upper var disk6 curcd1 junk; if dcd3=curcd1 then ast=' *'; u=u+1; end ; say brt||red||right(num,3)||yel||left(disk6,10)||grn||ast||cyan||strip(diskdesc); end; ; if sel = 'B' then say brt||cyan||name.i; if more=0 then if lines(file)=''0'' then signal more; if more=1 then if lines(file)=''0'' then signal more; if more=2 then if lines(file)=''0'' then signal more; if more=3 then do; if lines(file)=''0'' then call more; if lines(file)=''0''then return; end
if lines(file)=''0'' then signal qdel; x=x+y;end;more:; x=1; say ; ; if more=1 then do; if lines(file)<>0 then say 'More, Select file area? (Y,n,area#)'; if lines(file)=0 then say 'Select file area? (N,area#)'; end ; ; if more=0 then do; say 'More? (Y,n)'; end; ; if more=2 then do; if lines(file)<>0 then say 'More, File# ? (Y,n,#)'; if lines(file)=0 then say 'File# ? (N,#)'; end
; if more=3 then do; if lines(file)<>0 then say 'More, Select Disk? (Y,n,q,disk#)'; if lines(file)=0 then say 'Select Disk? (N,q,disk#)'; end; ; pull yn; ; if yn='N' then signal qdel; if yn='Q' then signal qdel; if more=2 then do; dt=datatype(yn); if dt='NUM' then call tagger; end ; if yn='Y' then if fs=1 then return ; if yn='Y' then if fs <>1 then signal loop2; if yn='' then do ; if lines(file)=0 then signal qdel; signal loop2; end
dt= datatype(yn); if dt='NUM' then if yn > i then yn=1; if more=1 then if dt='NUM' then call areasel; if more=3 then do; if dt<>'NUM' then yn=1; if dt='NUM' then return; end ; if lines(file)=''0'' then return;if fs=1 then return;signal loop2;qdel:;close=stream(file,c,'close');signal menu;;more1:;say 'more? (Y,n)';pull yn;if yn="N" then signal menu;count = 0;return
;tagger:;tag=yn;name3=name.tag;parse var name3 num filename date time desc;if filename <>'' then do; call sysfiletree homedir'*.req', 'file.', 'F'; if file.0=0 then firstime=1; u=1; paramno=17; do while u < cdes; paramno=paramno+1; parse upper var default.paramno dcd2 junk; parse upper var disk curcd; if dcd2=curcd then dcd=curcd; u=u+1; end ; if dcd=curcd then do; call lineout homedir''disk'.def',nmi alias user level loc fulldirectory filename date time desc; ok=stream(homedir''disk'.def',c,'close')
def=1; end; else do; call lineout homedir''disk'.req',nmi alias user level loc fulldirectory filename date time desc; ok=stream(homedir''disk'.req',c,'close'); reqflag=1; end ;end ;call more;return;;areasel:;name2=name.yn;fulldirectory=fulldir.yn;parse var name2 num areaname1 rest;areaname=strip(areaname1);file=homedir''disk'\'areaname'.bbs';more=2;sel='';call read
return;;change_disk:;file=homedir'disk.lst';more=3;call dmenu;call read;name4=name.yn;parse var name4 level loc num disk1 cdrom;disk=strip(disk1);if disk = 'CDROM' then do;say 'You do not have access to that disk, please select another';say 'Press <ENTER> to continue';pull;end;if disk = 'CDROM' then signal change_disk;return;;bull:;more=0
file=homedir'cdbull.txt';call read;return;;help:;more=0;file=homedir'cdhelp.txt';sel = 'B';call read;return;;dmenu:; if ansi=0 then do; '@cls'; say; say; say; say ; say ' CD Carousel Door'; say ' 'ver
say ' By Bill Esposito'; say; say ; say 'The Currently Selected CD is: 'disk; say ; say 'Note: CD'"'"'s marked with an * are on-line.'; say; end; ; if ansi=1 then do; '@cls'; say; say; say; say; say ' CD Carousel Door'; say ' 'ver; say ' by Bill Esposito'; say; say ' '
say 'The Currently Selected CD is: 'disk; say ''; say red'Note:'cyan' CD'"'"'s marked with an 'grn'*'cyan' are on-line.'; say; end;return;find:;notfound=0;more=4;count=0;i=0;'@cls';say;say;say;say;;if ansi=1 then say 'Enter Filename or search string? (any text or numbers, no wildcards)';if ansi=0 then say 'Enter Filename or search string? (any text or numbers, NO WILDCARDS)';say
pull what;if what='' then signal menu;file=homedir''disk'\names.lst';loop3:;more=4;fs=1;z=1;do until z=40;linein(file,1,0) ;;do until lines(file)=0; parse value linein(file) with drr fulldirectory dirdesc; drrr=homedir''disk'\'drr'.bbs'; file.='';areaname=drr;say brt||cyan'Directory: 'drr; ok=sysfilesearch(what, drrr, 'file.');;read1: ;x=1
y='1';name.0=0; do i=1 to file.0 ; if file.i<>'' then do; xx=right(x,2); name.i= xx'. 'file.i; if left(file.i,5) <>'FILE.' then do; name.i=left(name.i,79); parse var name.i num fn sz dt dc; say brt||red||right(num,3)||yel||left(fn,13)||red||right(sz,8)||grn||right(dt,9)||cyan' 'dc; end; if left(file.i,5) <>'FILE.' then notfound=1; if datatype(i/20,'W')=1 then call tag;end;x=x+y;end;if file.0 <>0 then call tag;z=z+y;end;if lines(file)<>0 then call loop3
ok=stream(file,c,'close');if notfound=0 then do; say ' Sorry, unable to find 'WHAT; say ' Press <ENTER> to continue'; pull ent;end ;;signal menu;;quit:;file=homedir'disk.lst'; if ansi=0 then do; '@cls'; say ' CD Carousel Door'; say ' 'ver; say ' By Bill Esposito'; say; end; ; if ansi = 1 then do
'@cls'; say ' CD Carousel Door'; say ' 'ver; say ' by Bill Esposito'; say '' ; end;if reqflag=1 then do;say First',';say ' You have requested the following files. You will receive a';say 'message for each sucessfully filled file request. Please K)ill';say 'these messages upon receipt. When posted, your files can be found';say 'for download in File Area 'fnum'.';say; ok=stream(file,c,'close');do until lines(file)=0; parse value linein(file) with priv lock disk1 diskdesc; disk=homedir''disk1'.req'; ok=stream(disk,c,'close'); x=8; request=yes
dsk=no; do until lines(disk)=0; request=no; if nmi='NO' then if alias='NO' then do; parse value linein(disk) with nmi1 alias1 first1 mid1 last1 priv lock directory filename sz dt desc; end ; if nmi='YES' then if alias='NO' then do; parse value linein(disk) with nmi1 alias1 first1 last1 priv lock directory filename sz dt desc; mid1=mid; end ; if alias='YES' then do; parse value linein(disk) with nmi1 alias1 first1 priv lock directory filename sz dt desc; mid1=mid; last1=''; end ; ; if x=20 then say; if x=20 then say 'Press <ENTER> to continue'; if x=20 then pull ak ; if x=20 then x=8
if first1=first then if mid1=mid then if last1=last then do; if dsk=no then say; if dsk=no then say 'CD: 'disk1''; dsk=yes; say left(filename,12) desc; request=yes; req=yes; end ; x=x+1; end; end;ok=stream(file,c,'close');say;if def = 1 then say 'The files you selected from the On-Line CD'"'"'s (*) are available 'brt||red'now'cyan' from File';if def = 1 then say 'Area 'fnum'.';end;if reqflag <> 1 then if def = 1 then do;h=1;;say first','
say;say ' The files you selected from the On-Line CD'"'"'s (*) are available 'brt||red'now'cyan' from File Area 'fnum'.';end;say;say 'Press <ENTER> to continue';pull ak ;call msg;quit1:;'@cls';file=homedir'disk.lst';do until lines(file)=0; parse value linein(file) with disk1 diskdesc; ok=stream(homedir''strip(disk1)'\names.lst',c,'close');end ;ok=stream(file,c,'close');if def=1 then do; siz=length(homedir); homedi=left(homedir,siz-1); drive=left(homedir,2); drive
'@cd' homedi; call cdmaint.cmd 0 1;end;if me=1 then call cdmenu.cmd;exit;;;tag: ; if lines(file)<>0 then say 'More, File# ? (Y,n,#)'; if lines(file)=0 then say 'File# ? (N,#)'; pull yn; ; if yn='N' then signal qdel; dt=datatype(yn); if dt='NUM' then do; tag=yn; name3=name.tag; parse var name3 num filename date time desc; if filename <>'' then do; call sysfiletree homedir'*.req', 'file.', 'F'
if file.0=0 then firstime=1;; u=1; paramno=17; do while u < cdes; paramno=paramno+1; parse upper var default.paramno dcd2 junk; parse upper var disk curcd; if dcd2=curcd then dcd=curcd; u=u+1; end ; if dcd=curcd then do; call lineout homedir''disk'.def',nmi alias user level loc fulldirectory filename date time desc; def=1; end; else do; call lineout homedir''disk'.req',nmi alias user level loc fulldirectory filename date time desc; ok=stream(homedir''disk'.req',c,'close'); reqflag=1; end
end; end ; if yn='' then do ; if lines(file)=0 then signal qdel; return; end; if yn='Y' then do ; if lines(file)=0 then signal qdel; return; end;call tag; k=stream(homedir''disk'.def',c,'close'); ok=stream(homedir''disk'.req',c,'close');return;msg:;if standalone = 1 then return;if req=yes then if firstime = 1 then do; /* MSGAPI */;address CMD 'rxsubcom drop msgapi';address CMD 'rxsubcom register MSGAPI rxmsgapi RXMSGAPI'
address CMD 'rxsubcom load MSGAPI RXMSGAPI';address MSGAPI;'OPEN_API 3 0';'OPEN_AREA MSG 'smarea' MSGAREA_NORMAL 'STYPE;'LOCK MSG';'OPEN_MSG MSGH MSG MOPEN_CREATE 0';cr = '0d'x;text = 'Hello 'SYSOPFIRST',' cr cr 'A User has requested a file from an off-line CD. Please run CDMenu at your' cr 'earliest convenience.' cr cr ' Thank you,' cr ' CD Carousel' cr cr cr '--- This File was brought to you by CD Carousel'cr ;controla = '01'x;control = controla || 'PID RXMSGAPI';xmsg.attr = 1;xmsg.from = CD Carousel;xmsg.to = SYSOPFIRST SYSOPLAST;xmsg.subj = 'File Request';xmsg.orig = tnode;xmsg.dest = fnode;hour=time('N');date2=date('S');year=left(date2,4);month=substr(date2,5,2)